Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / PostScript Imaging Messages


GXPostScriptSelectPaperType

QuickDraw GX sends the GXPostScriptSelectPaperType message prior to imaging the page, to select the printer's paper type for the page. You can override the GXPostScriptSelectPaperType message to do anything you need to do to make sure the device is set up correctly. Your override of the GXPostScriptSelectPaperType message must match the following formal declaration:

OSErr MyPostScriptSelectPaperType (gxPaperType aPaperType,
         long pageIndex, gxPostScriptImageDataHandle hImageData);
aPaperType
The paper-type object that is needed.
pageIndex
The page number of the page that is about to be imaged.
hImageData
A handle to the PostScript imaging system structure.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
The PostScript generic driver invokes the GXPostScriptSelectPaperType message when it is setting up the format for a page--after the page has been despooled but before it is imaged. This message selects the paper type for a printer. This message is sent by the default implementation of the GXPostScriptDoPageSetup message.

The default implementation of this message looks for a collection item of type 'post'
in the paper-type collection and sends that to the printer as the paper type for the page. The collection item must be valid PostScript that works for all PostScript devices.

You can override this message to customize the way that setting the paper type for the page works.

SPECIAL CONSIDERATIONS
You usually forward the GXPostScriptSelectPaperType message to other message handlers; however, if you are overriding this message to issue your own setpagedevice operation, do not forward this message.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
gxPaperTypeNotFoundThe specified paper type could not be found.
gxNoSuchPTGroupThe specified paper type could not be found.
The default implementation of the GXPostScriptSelectPaperType message can also return the communications errors that are listed in Table 4-2 on page 4-42.

SEE ALSO
The PostScript imaging system structure is described on page 4-26.

Paper types and paper-type collection items are described in Inside Macintosh: QuickDraw GX Printing.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help